// 全局共享数据示例
// import { DEFAULT_NAME } from '@/constants';
// import { useState } from 'react';

// const useUser = () => {
//   const [name, setName] = useState<string>(DEFAULT_NAME);
//   return {
//     name,
//     setName,
//   };
// };

// export default useUser;

export default {
  state: {
    username: '李四',
    password: '123456',
  },
  reducers: {
    setPassword(state: any, action: any) {
      console.log('state', state, 'action', action);

      return {
        ...state,
      };
    },
  },
};
